/*
 * @Author: 姚潘涛
 * @Date: 2024-06-03 10:39:52
 * @LastEditors: 姚潘涛
 * @LastEditTime: 2024-06-03 11:15:51
 * @Description:
 *
 * Copyright (c) 2024 by pandaman, All Rights Reserved.
 */
#ifndef BRAINSYS_LOG_MANAGER_H
#define BRAINSYS_LOG_MANAGER_H

#include <boost/filesystem.hpp>
#include <chrono>
#include <ctime>
#include <iomanip>
#include <string>

namespace xict_common {
    namespace log {
        /**
         * @brief Log管理器（单例）
         *
         */
        class LogManager {
        public:
            static LogManager* GetInstance();

            /**
             * @brief 初始化
             *
             * @param _log_root_path 根路径
             * @param _retention_days log保留时间
             */
            void Init(std::string _log_root_path, int _retention_days = 30);

            /**
             * @brief Get the Log Path object 获取log路径
             *
             * @return std::string
             */
            std::string GetLogPath();

        private:
            /// @brief  实例
            static LogManager* instance_;
            /// @brief  log路径
            std::string log_root_path_;
            /// @brief  当前log路径
            std::string current_log_path_;
        };
    }   // namespace log
}   // namespace xict_common

#endif
